import request from '@/utils/request'
import axios from 'axios'
// 查询项目列表
export function projectZtree(query) {
  return request({
    url: '/project/getMyProWithZone',
    method: 'get',
    params: query
  })
}
//获取分区死否有绑定信息
export function getZoneDetail(id){
  return request({
    url: '/pzuBindPath/'+id,
    method: 'get'
  })
}
//获取分区路线
export function getRouteList(id){
  return request({
    url: '/pzRoute/getRouteList/'+id,
    method: 'get'
  })
}
//获取分区区块
export function getGridList(id){
  return request({
    url: '/zBlock/grid/'+id,
    method: 'get'
  })
}
//获取异常列表
export function getAbnormalList(zoomId){
  return request({
    url: `/pzbAbnormal/getAllList/${zoomId}/-1`,
    method: 'get'
  })
}
//删除异常数据项
export function delError(Id){
  return request({
    url: '/pzbAbnormal/delete/'+Id,
    method: 'delete'
  })
}

// 获取异常详情信息
export function getErrorDetail(Id) {
  return request({
    url: '/pzbAbnormal/getById/'+Id,
    method: 'get',
  })
}

// 修改异常详情信息
export function putErrorDetail(data) {
  return request({
    url: 'pzbAbnormal/update',
    method: 'put',
    data: data
  })
}

//获取图
export function getErrorPhoto(data) {
  return request({
    url: 'pzbAbnormalFile/pictureList',
    method: 'get',
    params:data
  })
}

//删除异常内的图片(无)
export function delErrorPohto(data){
  return request({
    url: '/errorPoint/photo',
    method: 'delete',
    data: data
  })
}


//获取异常卡id
export function getAbnormalInfo(id) {
  return request({
    url: 'abnormalExport/build/'+id,
    method: 'get'
  })
}
//获取异常卡信息
export function getAb(id){
  return request({
    url:'abnormalExport/getById/'+id,
    method:'get'
  })
}
 //删除异常图片
 export function deleteImg(data){
  return request({
    url:'abnormalExport/delVectorgraph',
    method:'delete',
    data:data
  })
}

  //获取备注信息
export function getRemarks(id){
    return request({
      url:'pzbAbnormalAudio/remarksByAbnaomalId/'+id,
      method:'get'
    })}
  //获取视频列表 
export function getVidoeList(data){
  return request({
    url:'/pzbAbnormalAudio/videoList',
    method:'get',
    params:data
  })
}
//上传异常卡数据
export function uploadData(data){
  return request({
    url:'/abnormalExport/complete',
    method:'post',
    data:data,
    // headers: {'Content-Type':'application/x-www-form-urlencoded'},
  })
}

//上传文件
export function uploadImage(data,file){
  return request({
    url:'/abnormalExport/upload',
    method:'post',
    data:data,
    headers: {'Content-Type': 'application/x-www-form-urlencoded'},
  })
}
//上传文件
export function dowload(id){
  return request({
    url:'/abnormalExport/export/'+id,
    method:'get',
  })
}

// 根据分区id获取分区绑定的方法列表=========================================================
export function getMethods(id){
  return request({
    url:'/pzTaskAssign/getMethodsByZoneId/'+id,
    method:'get',
  })
}
// 查询批次下的空间位置
export function getGeoList(data){
  return request({
    url:'/data/getGeoList',
    method:'post',
    data
  })
}
// 查询分区及方法树形结构
export function getZoneList(id){
  return request({
    url:'/data/getZoneList/'+id,
    method:'get',
  })
}
// 钻孔属性值名称
export function getPname(params){
  return request({
    url:'/data/getPname/',
    method:'get',
    params:params
  })
}
// 钻孔高度范围
export function getDepthRange(params){
  return request({
    url:'/data/getDepthRange/',
    method:'get',
    params:params
  })
}
//获取钻孔图片
export function getRenderDrillImg(params){
  return request({
    url:'/data/renderDrillImg',
    method:'post',
    data:params
  })
}


// 查询钻孔的数据列表
export function getDrillGrid(data){
  return request({
    url:'/data/getDrillGrid',
    method:'post',
    data
  })
}
// 查询EM的数据列表
export function getEMGrid(data){
  return request({
    url:'/data/getEMGrid',
    method:'post',
    data
  })
}
// 查询监测井的数据列表
export function getWellGrid(data){
  return request({
    url:'/data/getWellGrid',
    method:'post',
    data
  })
}
// 查询ERT的数据列表
export function getErtGrid(data){
  return request({
    url:'/data/getErtGrid',
    method:'post',
    data
  })
}

// 查询EM测试数据
export function getEmData(id){
  return request({
    url:'/em/point/getEMDataByStage/'+id,
    method:'get',
  })
}
